package com.admin.web.controller.work;


import com.admin.common.core.domain.AjaxResult;
import com.admin.work.service.IWorkCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.admin.common.core.domain.AjaxResult.success;

/**
 * 公司信息操作处理
 *
 * @author fzgnin
 */
@RestController
@RequestMapping("/work/company")
public class WorkCompanyController {
    @Autowired
    private IWorkCompanyService companyService;

    /**
     * 根据岗位编号获取详细信息
     */
    @PreAuthorize("@ss.hasPermi('work:company:query')")
    @GetMapping(value = "/{query}")
    public AjaxResult getInfo(@PathVariable String query)
    {
        return success(companyService.selectByNameORCode(query));
    }
}
